home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / rfc / rfc1505 < prev    next >
Text File  |  1993-08-26  |  64KB  |  2,020 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                        A. Costanzo
  8. Request for Comments: 1505                                AKC Consulting
  9. Obsoletes: 1154                                              D. Robinson
  10.                                               Computervision Corporation
  11.                                                               R. Ullmann
  12.                                                              August 1993
  13.  
  14.  
  15.               Encoding Header Field for Internet Messages
  16.  
  17. Status of this Memo
  18.  
  19.    This memo defines an Experimental Protocol for the Internet
  20.    community.  It does not specify an Internet standard.  Discussion and
  21.    suggestions for improvement are requested.  Please refer to the
  22.    current edition of the "IAB Official Protocol Standards" for the
  23.    standardization state and status of this protocol.  Distribution of
  24.    this memo is unlimited.
  25.  
  26. IESG Note
  27.  
  28.    Note that a standards-track technology already exists in this area
  29.    [11].
  30.  
  31. Abstract
  32.  
  33.    This document expands upon the elective experimental Encoding header
  34.    field which permits the mailing of multi-part, multi-structured
  35.    messages.  It replaces RFC 1154 [1].
  36.  
  37. Table of Contents
  38.  
  39.           1.      Introduction . . . . . . . . . . . . . . . . . . . . 3
  40.           2.      The Encoding Field . . . . . . . . . . . . . . . . . 3
  41.           2.1       Format of the Encoding Field . . . . . . . . . . . 3
  42.           2.2       <count>  . . . . . . . . . . . . . . . . . . . . . 4
  43.           2.3       <keyword>  . . . . . . . . . . . . . . . . . . . . 4
  44.           2.3.1       Nested Keywords  . . . . . . . . . . . . . . . . 4
  45.           2.4       Comments . . . . . . . . . . . . . . . . . . . . . 4
  46.           3.      Encodings  . . . . . . . . . . . . . . . . . . . . . 5
  47.           3.1       Text . . . . . . . . . . . . . . . . . . . . . . . 5
  48.           3.2       Message  . . . . . . . . . . . . . . . . . . . . . 6
  49.           3.3       Hex  . . . . . . . . . . . . . . . . . . . . . . . 6
  50.           3.4       EVFU . . . . . . . . . . . . . . . . . . . . . . . 6
  51.           3.5       EDI-X12 and EDIFACT  . . . . . . . . . . . . . . . 7
  52.           3.6       FS   . . . . . . . . . . . . . . . . . . . . . . . 7
  53.           3.7       LZJU90 . . . . . . . . . . . . . . . . . . . . . . 7
  54.           3.8       LZW  . . . . . . . . . . . . . . . . . . . . . . . 7
  55.  
  56.  
  57.  
  58. Costanzo, Robinson & Ullmann                                    [Page 1]
  59.  
  60. RFC 1505                 Encoding Header Field               August 1993
  61.  
  62.  
  63.           3.9       UUENCODE . . . . . . . . . . . . . . . . . . . . . 7
  64.           3.10      PEM and PEM-Clear  . . . . . . . . . . . . . . . . 8
  65.           3.11      PGP  . . . . . . . . . . . . . . . . . . . . . . . 8
  66.           3.12      Signature  . . . . . . . . . . . . . . . . . . .  10
  67.           3.13      TAR  . . . . . . . . . . . . . . . . . . . . . .  10
  68.           3.14      PostScript . . . . . . . . . . . . . . . . . . .  10
  69.           3.15      SHAR . . . . . . . . . . . . . . . . . . . . . .  10
  70.           3.16      Uniform Resource Locator . . . . . . . . . . . .  10
  71.           3.17      Registering New Keywords . . . . . . . . . . . .  11
  72.           4.      FS (File System) Object Encoding . . . . . . . . .  11
  73.           4.1       Sections . . . . . . . . . . . . . . . . . . . .  12
  74.           4.1.1       Directory  . . . . . . . . . . . . . . . . . .  12
  75.           4.1.2       Entry  . . . . . . . . . . . . . . . . . . . .  13
  76.           4.1.3       File . . . . . . . . . . . . . . . . . . . . .  13
  77.           4.1.4       Segment  . . . . . . . . . . . . . . . . . . .  13
  78.           4.1.5       Data . . . . . . . . . . . . . . . . . . . . .  14
  79.           4.2       Attributes . . . . . . . . . . . . . . . . . . .  14
  80.           4.2.1       Display  . . . . . . . . . . . . . . . . . . .  14
  81.           4.2.2       Comment  . . . . . . . . . . . . . . . . . . .  15
  82.           4.2.3       Type . . . . . . . . . . . . . . . . . . . . .  15
  83.           4.2.4       Created  . . . . . . . . . . . . . . . . . . .  15
  84.           4.2.5       Modified . . . . . . . . . . . . . . . . . . .  15
  85.           4.2.6       Accessed . . . . . . . . . . . . . . . . . . .  15
  86.           4.2.7       Owner  . . . . . . . . . . . . . . . . . . . .  15
  87.           4.2.8       Group  . . . . . . . . . . . . . . . . . . . .  16
  88.           4.2.9       ACL  . . . . . . . . . . . . . . . . . . . . .  16
  89.           4.2.10      Password . . . . . . . . . . . . . . . . . . .  16
  90.           4.2.11      Block  . . . . . . . . . . . . . . . . . . . .  16
  91.           4.2.12      Record . . . . . . . . . . . . . . . . . . . .  17
  92.           4.2.13      Application  . . . . . . . . . . . . . . . . .  17
  93.           4.3       Date Field . . . . . . . . . . . . . . . . . . .  17
  94.           4.3.1       Syntax . . . . . . . . . . . . . . . . . . . .  17
  95.           4.3.2       Semantics  . . . . . . . . . . . . . . . . . .  17
  96.           5.      LZJU90: Compressed Encoding  . . . . . . . . . . .  18
  97.           5.1       Overview . . . . . . . . . . . . . . . . . . . .  18
  98.           5.2       Specification of the LZJU90 compression  . . . .  19
  99.           5.3       The Decoder  . . . . . . . . . . . . . . . . . .  21
  100.           5.3.1       An example of an Encoder . . . . . . . . . . .  27
  101.           5.3.2       Example LZJU90 Compressed Object . . . . . . .  33
  102.           6.      Alphabetical Listing of Defined Encodings  . . . .  34
  103.           7.      Security Considerations  . . . . . . . . . . . . .  34
  104.           8.      References . . . . . . . . . . . . . . . . . . . .  34
  105.           9.      Acknowledgements . . . . . . . . . . . . . . . . .  35
  106.           10.     Authors' Addresses . . . . . . . . . . . . . . . .  36
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Costanzo, Robinson & Ullmann                                    [Page 2]
  115.  
  116. RFC 1505                 Encoding Header Field               August 1993
  117.  
  118.  
  119. 1.  Introduction
  120.  
  121.    STD 11, RFC 822 [2] defines an electronic mail message to consist of
  122.    two parts, the message header and the message body, separated by a
  123.    blank line.
  124.  
  125.    The Encoding header field permits the message body itself to be
  126.    further broken up into parts, each part also separated from the next
  127.    by a blank line.  Thus, conceptually, a message has a header part,
  128.    followed by one or more body parts, all separated by apparently blank
  129.    lines.  Each body part has an encoding type.  The default (no
  130.    Encoding field in the header) is a one part message body of type
  131.    "Text".
  132.  
  133.    The purpose of Encoding is to be descriptive of the content of a mail
  134.    message without placing constraints on the content or requiring
  135.    additional structure to appear in the body of the message that will
  136.    interfere with other processing.
  137.  
  138.    A similar message format is used in the network news facility, and
  139.    posted articles are often transferred by gateways between news and
  140.    mail.  The Encoding field is perhaps even more useful in news, where
  141.    articles often are uuencoded or shar'd, and have a number of
  142.    different nested encodings of graphics images and so forth.  In news
  143.    in particular, the Encoding header keeps the structural information
  144.    within the (usually concealed) article header, without affecting the
  145.    visual presentation by simple news-reading software.
  146.  
  147. 2.  The Encoding Field
  148.  
  149.    The Encoding field consists of one or more subfields, separated by
  150.    commas.  Each subfield corresponds to a part of the message, in the
  151.    order of that part's appearance.  A subfield consists of a line count
  152.    and a keyword or a series of nested keywords defining the encoding.
  153.    The line count is optional in the last subfield.
  154.  
  155. 2.1  Format of the Encoding Field
  156.  
  157.    The format of the Encoding field is:
  158.  
  159.         [  <count> <keyword> [ <keyword> ]* ,  ]*
  160.                 [ <count> ] <keyword> [ <keyword> ]*
  161.  
  162.         where:
  163.  
  164.         <count>    := a decimal integer
  165.         <keyword>  := a single alphanumeric token starting with an alpha
  166.  
  167.  
  168.  
  169.  
  170. Costanzo, Robinson & Ullmann                                    [Page 3]
  171.  
  172. RFC 1505                 Encoding Header Field               August 1993
  173.  
  174.  
  175. 2.2  <count>
  176.  
  177.    The line count is a decimal number specifying the number of text
  178.    lines in the part.  Parts are separated by a blank line, which is not
  179.    included in the count of either the preceding or following part.
  180.    Blank lines consist only of CR/LF.  Count may be zero, it must be
  181.    non-negative.
  182.  
  183.    It is always possible to determine if the count is present because a
  184.    count always begins with a digit and a keyword always begins with a
  185.    letter.
  186.  
  187.    The count is not required on the last or only part.  A multi-part
  188.    message that consists of only one part is thus identical to a
  189.    single-part message.
  190.  
  191. 2.3  <keyword>
  192.  
  193.    Keyword defines the encoding type.  The keyword is a common single-
  194.    word name for the encoding type and is not case-sensitive.
  195.  
  196.              Encoding: 107 Text
  197.  
  198. 2.3.1  Nested Keywords
  199.  
  200.    Nested keywords are a series of keywords defining a multi-encoded
  201.    message part.  The encoding keywords may either be an actual series
  202.    of encoding steps the encoder used to generate the message part or
  203.    may merely be used to more precisely identify the type of encoding
  204.    (as in the use of the keyword "Signature").
  205.  
  206.    Nested keywords are parsed and generated from left to right.  The
  207.    order is significant.  A decoding application would process the list
  208.    from left to right, whereas, an encoder would process the Internet
  209.    message and generate the nested keywords in the reverse order of the
  210.    actual encoding process.
  211.  
  212.         Encoding: 458 uuencode LZW tar (Unix binary object)
  213.  
  214. 2.4  Comments
  215.  
  216.    Comments enclosed in parentheses may be inserted anywhere in the
  217.    encoding field.  Mail reading systems may pass the comments to their
  218.    clients.  Comments must not be used by mail reading systems for
  219.    content interpretation.  Other parameters defining the type of
  220.    encoding must be contained within the body portion of the Internet
  221.    message or be implied by a keyword in the encoding field.
  222.  
  223.  
  224.  
  225.  
  226. Costanzo, Robinson & Ullmann                                    [Page 4]
  227.  
  228. RFC 1505                 Encoding Header Field               August 1993
  229.  
  230.  
  231. 3.  Encodings
  232.  
  233.    This section describes some of the defined encodings used.  An
  234.    alphabetical listing is provided in Section 6.
  235.  
  236.    As with the other keyword-defined parts of the header format
  237.    standard, new keywords are expected and welcomed.  Several basic
  238.    principles should be followed in adding encodings.  The keyword
  239.    should be the most common single word name for the encoding,
  240.    including acronyms if appropriate.  The intent is that different
  241.    implementors will be likely to choose the same name for the same
  242.    encoding.  Keywords should not be too general:  "binary" would have
  243.    been a bad choice for the "hex" encoding.
  244.  
  245.    The encoding should be as free from unnecessary idiosyncracies as
  246.    possible, except when conforming to an existing standard, in which
  247.    case there is nothing that can be done.
  248.  
  249.    The encoding should, if possible, use only the 7 bit ASCII printing
  250.    characters if it is a complete transformation of a source document
  251.    (e.g., "hex" or "uuencode").  If it is essentially a text format, the
  252.    full range may be used.  If there is an external standard, the
  253.    character set may already be defined.  Keywords beginning with "X-"
  254.    are permanently reserved to implementation-specific use.  No standard
  255.    registered encoding keyword will ever begin with "X-".
  256.  
  257.    New encoding keywords which are not reserved for implementation-
  258.    specific use must be registered with the Internet Assigned Numbers
  259.    Authority (IANA).  Refer to section 3.17 for additional information.
  260.  
  261. 3.1  Text
  262.  
  263.    This indicates that the message is in no particular encoded format,
  264.    but is to be presented to the user as-is.
  265.  
  266.    The text is ISO-10646-UTF-1 [3].  As specified in STD 10, RFC 821
  267.    [10], the message is expected to consist of lines of reasonable
  268.    length (less than or equal to 1000 characters).
  269.  
  270.    On some older implementations of mail and news, only the 7 bit subset
  271.    of ISO-10646-UTF-1 can be used.  This is identical to the ASCII 7 bit
  272.    code.  On some mail transports that are not compliant with STD 10,
  273.    RFC 821 [10], line length may be restricted by the service.
  274.  
  275.    Text may be followed by a nested keyword to define the encoded part
  276.    further, e.g., "signature":
  277.  
  278.         Encoding: 496 Text, 8 Text Signature
  279.  
  280.  
  281.  
  282. Costanzo, Robinson & Ullmann                                    [Page 5]
  283.  
  284. RFC 1505                 Encoding Header Field               August 1993
  285.  
  286.  
  287.    An automated file sending service may find this useful, for example,
  288.    to differentiate between and ignore the signature area when parsing
  289.    the body of a message for file requests.
  290.  
  291. 3.2  Message
  292.  
  293.    This encoding indicates that the body part is itself in the format of
  294.    an Internet message, with its own header part and body part(s).  A
  295.    "message" body part's message header may be a full Internet message
  296.    header or it may consist only of an Encoding field.
  297.  
  298.    Using the message encoding on returned mail makes it practical for a
  299.    mail reading system to implement a reliable automatic resending
  300.    function, if the mailer generates it when returning contents.  It is
  301.    also useful in a "copy append" MUA (mail user agent) operation.
  302.  
  303.    MTAs (mail transfer agents) returning mail should generate an
  304.    Encoding header.  Note that this does not require any parsing or
  305.    transformation of the returned message; the message is simply
  306.    appended un-modified; MTAs are prohibited from modifying the content
  307.    of messages.
  308.  
  309.         Encoding: 7 Text (Return Reason), Message (Returned Mail)
  310.  
  311. 3.3  Hex
  312.  
  313.    The encoding indicates that the body part contains binary data,
  314.    encoded as 2 hexadecimal digits per byte, highest significant nibble
  315.    first.
  316.  
  317.    Lines consist of an even number of hexadecimal digits.  Blank lines
  318.    are not permitted.  The decode process must accept lines with between
  319.    2 and 1000 characters, inclusive.
  320.  
  321.    The Hex encoding is provided as a simple way of providing a method of
  322.    encoding small binary objects.
  323.  
  324. 3.4  EVFU
  325.  
  326.    EVFU (electronic vertical format unit) specifies that each line
  327.    begins with a one-character "channel selector".  The original purpose
  328.    was to select a channel on a paper tape loop controlling the printer.
  329.  
  330.    This encoding is sometimes called "FORTRAN" format.  It is the
  331.    default output format of FORTRAN programs on a number of computer
  332.    systems.
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Costanzo, Robinson & Ullmann                                    [Page 6]
  339.  
  340. RFC 1505                 Encoding Header Field               August 1993
  341.  
  342.  
  343.    The legal characters are '0' to '9', '+', '-', and space.  These
  344.    correspond to the 12 rows (and absence of a punch) on a printer
  345.    control tape (used when the control unit was electromechanical).
  346.  
  347.    The channels that have generally agreed definitions are:
  348.  
  349.         1          advances to the first print line on the next page
  350.         0          skip a line, i.e., double-space
  351.         +          over-print the preceeding line
  352.         -          skip 2 lines, i.e., triple-space
  353.         (space)    print on the next line, single-space
  354.  
  355. 3.5  EDI-X12 and EDIFACT
  356.  
  357.    The EDI-X12 and EDIFACT keywords indicate that the message or part is
  358.    a EDI (Electronic Document Interchange) business document, formatted
  359.    according to ANSI X12 or the EDIFACT standard.
  360.  
  361.    A message containing a note and 2 X12 purchase orders might have an
  362.    encoding of:
  363.  
  364.         Encoding: 17 TEXT, 146 EDI-X12, 69 EDI-X12
  365.  
  366. 3.6  FS
  367.  
  368.    The FS (File System) keyword specifies a section consisting of
  369.    encoded file system objects.  This encoding method (defined in
  370.    section 4) allows the moving of a structured set of files from one
  371.    environment to another while preserving all common elements.
  372.  
  373. 3.7  LZJU90
  374.  
  375.    The LZJU90 keyword specifies a section consisting of an encoded
  376.    binary or text object.  The encoding (defined in section 5) provides
  377.    both compression and representation in a text format.
  378.  
  379. 3.8  LZW
  380.  
  381.    The LZW keyword specifies a section consisting of the data produced
  382.    by the Unix compress program.
  383.  
  384. 3.9  UUENCODE
  385.  
  386.    The uuencode keyword specifies a section consisting of the output of
  387.    the uuencode program supplied as part of uucp.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Costanzo, Robinson & Ullmann                                    [Page 7]
  395.  
  396. RFC 1505                 Encoding Header Field               August 1993
  397.  
  398.  
  399. 3.10  PEM and PEM-Clear
  400.  
  401.    The PEM and PEM-Clear keywords indicate that the section is encrypted
  402.    with the methods specified in RFCs 1421-1424 [4,5,6,7] or uses the
  403.    MIC-Clear encapsulation specified therein.
  404.  
  405.    A simple text object encrypted with PEM has the header:
  406.  
  407.              Encoding: PEM Text
  408.  
  409.    Note that while this indicates that the text resulting from the PEM
  410.    decryption is ISO-10646-UTF-1 text, the present version of PEM
  411.    further restricts this to only the 7 bit subset.  A future version of
  412.    PEM may lift this restriction.
  413.  
  414.    If the object resulting from the decryption starts with Internet
  415.    message header(s), the encoding is:
  416.  
  417.              Encoding: PEM Message
  418.  
  419.    This is useful to conceal both the encoding within and the headers
  420.    not needed to deliver the message (such as Subject:).
  421.  
  422.    PEM does not provide detached signatures, but rather provides the
  423.    MIC-Clear mode to send messages with integrity checks that are not
  424.    encrypted.  In this mode, the keyword PEM-Clear is used:
  425.  
  426.              Encoding: PEM-Clear EDIFACT
  427.  
  428.    The example being a non-encrypted EDIFACT transaction with a digital
  429.    signature.  With the proper selection of PEM parameters and
  430.    environment, this can also provide non-repudiation, but it does not
  431.    provide confidentiality.
  432.  
  433.    Decoders that are capable of decrypting PEM treat the two keywords in
  434.    the same way, using the contained PEM headers to distinguish the
  435.    mode.  Decoders that do not understand PEM can use the PEM-Clear
  436.    keyword as a hint that it may be useful to treat the section as text,
  437.    or even continue the decode sequence after removing the PEM headers.
  438.  
  439.    When Encoding is used for PEM, the RFC934 [9] encapsulation specified
  440.    in RFC1421 is not used.
  441.  
  442. 3.11  PGP
  443.  
  444.    The PGP keyword indicates that the section is encrypted using the
  445.    Pretty Good Privacy specification, or is a public key block, keyring,
  446.    or detached signature meaningful to the PGP program.  (These objects
  447.  
  448.  
  449.  
  450. Costanzo, Robinson & Ullmann                                    [Page 8]
  451.  
  452. RFC 1505                 Encoding Header Field               August 1993
  453.  
  454.  
  455.    are distinguished by internal information.)
  456.  
  457.    The keyword actually implies 3 different transforms:  a compression
  458.    step, the encryption, and an ASCII encoding.  These transforms are
  459.    internal to the PGP encoder/decoder.  A simple text message encrypted
  460.    with PGP is specified by:
  461.  
  462.         Encoding: PGP Text
  463.  
  464.    An EDI transaction using ANSI X12 might be:
  465.  
  466.         Encoding: 176 PGP EDI-X12
  467.  
  468.    Since an evesdropper can still "see" the nested type (Text or EDI in
  469.    these examples), thus making information available to traffic
  470.    analysis which is undesirable in some applications, the sender may
  471.    prefer to use:
  472.  
  473.         Encoding: PGP Message
  474.  
  475.    As discussed in the description of the Message keyword, the enclosed
  476.    object may have a complete header or consist only of an Encoding:
  477.    header describing its content.
  478.  
  479.    When PGP is used to transmit an encoded key or keyring, with no
  480.    object significant to the mail user agent as a result of the decoding
  481.    (e.g., text to display), the keyword is used by itself.
  482.  
  483.    Another case of the PGP keyword occurs in "clear-signing" a message.
  484.    That is, sending an un-encrypted message with a digital signature
  485.    providing authentication and (in some environments) non-deniability.
  486.  
  487.         Encoding: 201 Text, 8 PGP Signature, 4 Text Signature
  488.  
  489.    This example indicates a 201 line message, followed by an 8 line (in
  490.    its encoded form) PGP detached signature.  The processing of the PGP
  491.    section is expected (in this example) to result in a text object that
  492.    is to be treated by the receiver as a signature, possibly something
  493.    like:
  494.  
  495.         [PGP signed Ariel@Process.COM Robert L Ullmann  VALID/TRUSTED]
  496.  
  497.    Note that the PGP signature algorithm is applied to the encoded form
  498.    of the clear-text section, not the object(s) before encoding.  (Which
  499.    would be quite difficult for encodings like tar or FS).  Continuing
  500.    the example, the PGP signature is then followed by a 4 line
  501.    "ordinary" signature section.
  502.  
  503.  
  504.  
  505.  
  506. Costanzo, Robinson & Ullmann                                    [Page 9]
  507.  
  508. RFC 1505                 Encoding Header Field               August 1993
  509.  
  510.  
  511. 3.12  Signature
  512.  
  513.    The signature keyword indicates that the section contains an Internet
  514.    message signature.  An Internet message signature is an area of an
  515.    Internet message (usually located at the end) which contains a single
  516.    line or multiple lines of characters.  The signature may comprise the
  517.    sender's name or a saying the sender is fond of.  It is normally
  518.    inserted automatically in all outgoing message bodies.  The encoding
  519.    keyword "Signature" must always be nested and follow another keyword.
  520.  
  521.         Encoding: 14 Text, 3 Text Signature
  522.  
  523.    A usenet news posting program should generate an encoding showing
  524.    which is the text and which is the signature area of the posted
  525.    message.
  526.  
  527. 3.13  TAR
  528.  
  529.    The tar keyword specifies a section consisting of the output of the
  530.    tar program supplied as part of Unix.
  531.  
  532. 3.14  PostScript
  533.  
  534.    The PostScript keyword specifies a section formatted according to the
  535.    PostScript [8] computer program language definition.  PostScript is a
  536.    registered trademark of Adobe Systems Inc.
  537.  
  538. 3.15  SHAR
  539.  
  540.    The SHAR keyword specifies a section encoded in shell archive format.
  541.    Use of shar, although supported, is not recommended.
  542.  
  543.    WARNING:  Because the shell archive may contain commands you may not
  544.    want executed, the decoder should not automatically execute decoded
  545.    shell archived statements.  This warning also applies to any future
  546.    types that include commands to be executed by the receiver.
  547.  
  548. 3.16  Uniform Resource Locator
  549.  
  550.    The URL keyword indicates that the section consists of zero or more
  551.    references to resources of some type.  URL provides a facility to
  552.    include by reference arbitrary external resources from various
  553.    sources in the Internet.  The specification of URL is a work in
  554.    progress in the URI working group of the IETF.
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Costanzo, Robinson & Ullmann                                   [Page 10]
  563.  
  564. RFC 1505                 Encoding Header Field               August 1993
  565.  
  566.  
  567. 3.17  Registering New Keywords
  568.  
  569.    New encoding keywords which are not reserved for implementation-
  570.    specific use must be registered with the Internet Assigned Numbers
  571.    Authority (IANA).  IANA acts as a central registry for these values.
  572.    IANA may reject or modify the keyword registration request if it does
  573.    not meet the criteria as specified in section 3.  Keywords beginning
  574.    with "X-" are permanently reserved to implementation-specific use.
  575.    IANA will not register an encoding keyword that begins with "X-".
  576.    Registration requests should be sent via electronic mail to IANA as
  577.    follows:
  578.  
  579.              To:  IANA@isi.edu
  580.              Subject:  Registration of a new EHF-MAIL Keyword
  581.  
  582.    The mail message must specify the keyword for the encoding and
  583.    acronyms if appropriate.  Documentation defining the keyword and its
  584.    proposed purpose must be included.  The documentation must either
  585.    reference an external non-Internet standards document or an existing
  586.    or soon to be RFC.  If applicable, the documentation should contain a
  587.    draft version of the future RFC.  The draft must be submitted as a
  588.    RFC according to the normal procedure within a reasonable amount of
  589.    time after the keyword's registration has been approved.
  590.  
  591. 4.  FS (File System) Object Encoding
  592.  
  593.    The file system encoding provides a standard, transportable encoding
  594.    of file system objects from many different operating systems.  The
  595.    intent is to allow the moving of a structured set of files from one
  596.    environment to another while preserving common elements.  At the same
  597.    time, files can be moved within a single environment while preserving
  598.    all attributes.
  599.  
  600.    The representations consist of a series of nested sections, with
  601.    attributes defined at the appropriate levels.  Each section begins
  602.    with an open bracket "[" followed by a directive keyword and ends
  603.    with a close bracket "]".  Attributes are lines, beginning with a
  604.    keyword.  Lines which begin with a LWSP (linear white space)
  605.    character are continuation lines.
  606.  
  607.    Any string-type directive or attribute may be a simple string not
  608.    starting with a quotation mark ( " ) and not containing special
  609.    characters (e.g.  newline) or LWSP (space and tab).  The string name
  610.    begins with the first non-LWSP character on the line following the
  611.    attribute or directive keyword and ends with the last non-LWSP
  612.    character.
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Costanzo, Robinson & Ullmann                                   [Page 11]
  619.  
  620. RFC 1505                 Encoding Header Field               August 1993
  621.  
  622.  
  623.    Otherwise, the character string name is enclosed in quotes.  The
  624.    string itself contains characters in ISO-10646-UTF-1 but is quoted
  625.    and escaped at octet level (as elsewhere in RFC822 [2]).  The strings
  626.    begin and end with a quotation mark ( " ).  Octets equal to quote in
  627.    the string are escaped, as are octets equal to the escape characters
  628.    (\" and \\).  The escaped octets may be part of a UTF multi-octet
  629.    character.  Octets that are not printable are escaped with \nnn octal
  630.    representation.  When an escape (\) occurs at the end of a line, the
  631.    escape, the end of the line, and the first character of the next
  632.    line, which must be one of the LWSP characters, are removed
  633.    (ignored).
  634.  
  635.     [ file Simple-File.Name
  636.  
  637.     [ file "   Long file name starting with spaces and having a couple\
  638.       [sic] of nasties in it like this newline\012near the end."
  639.  
  640.    Note that in the above example, there is one space (not two) between
  641.    "couple" and "[sic]".  The encoder may choose to use the nnn sequence
  642.    for any character that might cause trouble.  Refer to section 5.1 for
  643.    line length recommendations.
  644.  
  645. 4.1  Sections
  646.  
  647.    A section starts with an open bracket, followed by a keyword that
  648.    defines the type of section.
  649.  
  650.    The section keywords are:
  651.  
  652.              directory
  653.              entry
  654.              file
  655.              segment
  656.              data
  657.  
  658.    The encoding may start with either a file, directory or entry.  A
  659.    directory section may contain zero or more file, entry, and directory
  660.    sections.  A file section contains a data section or zero or more
  661.    segment sections.  A segment section contains a data section or zero
  662.    or more segment sections.
  663.  
  664. 4.1.1  Directory
  665.  
  666.    This indicates the start of a directory.  There is one parameter, the
  667.    entry name of the directory:
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Costanzo, Robinson & Ullmann                                   [Page 12]
  675.  
  676. RFC 1505                 Encoding Header Field               August 1993
  677.  
  678.  
  679.              [ directory foo
  680.              ...
  681.              ]
  682.  
  683. 4.1.2  Entry
  684.  
  685.    The entry keyword represents an entry in a directory that is not a
  686.    file or a sub-directory.  Examples of entries are soft links in Unix,
  687.    or access categories in Primos.  A Primos access category might look
  688.    like this:
  689.  
  690.              [ entry SYS.ACAT
  691.              type ACAT
  692.              created 27 Jan 1987 15:31:04.00
  693.              acl SYADMIN:* ARIEL:DALURWX $REST:
  694.              ]
  695.  
  696. 4.1.3  File
  697.  
  698.    The file keyword is followed by the entry name of the file.  The
  699.    section then continues with attributes, possibly segments, and then
  700.    data.
  701.  
  702.              [ file MY.FILE
  703.              created 27 Feb 1987 12:10:20.07
  704.              modified 27 Mar 1987 16:17:03.02
  705.              type DAM
  706.              [ data LZJU90
  707.              * LZJU90
  708.              ...
  709.              ]]
  710.  
  711. 4.1.4  Segment
  712.  
  713.    This is used to define segments of a file.  It should only be used
  714.    when encoding files that are actually segmented.  The optional
  715.    parameter is the number or name of the segment.
  716.  
  717.    When encoding Macintosh files, the two forks of the file are treated
  718.    as segments:
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Costanzo, Robinson & Ullmann                                   [Page 13]
  731.  
  732. RFC 1505                 Encoding Header Field               August 1993
  733.  
  734.  
  735.              [ file A.MAC.FILE
  736.              display "A Mac File"
  737.              type MAC
  738.              comment "I created this myself"
  739.              ...
  740.              [ segment resource
  741.              [ data ...
  742.              ...
  743.              ]]
  744.              [ segment data
  745.              [ data ...
  746.              ...
  747.              ]]]
  748.  
  749. 4.1.5  Data
  750.  
  751.    The data section contains the encoded data of the file.  The encoding
  752.    method is defined in section 5.  The data section must be last within
  753.    the containing section.
  754.  
  755. 4.2  Attributes
  756.  
  757.    Attributes may occur within file, entry, directory, and segment
  758.    sections.  Attributes must occur before sub-sections.
  759.  
  760.    The attribute directives are:
  761.  
  762.              display
  763.              type
  764.              created
  765.              modified
  766.              accessed
  767.              owner
  768.              group
  769.              acl
  770.              password
  771.              block
  772.              record
  773.              application
  774.  
  775. 4.2.1  Display
  776.  
  777.    This indicates the display name of the object.  Some systems, such as
  778.    the Macintosh, use a different form of the name for matching or
  779.    uniqueness.
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Costanzo, Robinson & Ullmann                                   [Page 14]
  787.  
  788. RFC 1505                 Encoding Header Field               August 1993
  789.  
  790.  
  791. 4.2.2  Comment
  792.  
  793.    This contains an arbitrary comment on the object.  The Macintosh
  794.    stores this attribute with the file.
  795.  
  796. 4.2.3  Type
  797.  
  798.    The type of an object is usually of interest only to the operating
  799.    system that the object was created on.
  800.  
  801.    Types are:
  802.  
  803.           ACAT       access category (Primos)
  804.           CAM        contiguous access method (Primos)
  805.           DAM        direct access method (Primos)
  806.           FIXED      fixed length records (VMS)
  807.           FLAT       `flat file', sequence of bytes (Unix, DOS, default)
  808.           ISAM       indexed-sequential access method (VMS)
  809.           LINK       soft link (Unix)
  810.           MAC        Macintosh file
  811.           SAM        sequential access method (Primos)
  812.           SEGSAM     segmented direct access method (Primos)
  813.           SEGDAM     segmented sequential access method (Primos)
  814.           TEXT       lines of ISO-10646-UTF-1 text ending with CR/LF
  815.           VAR        variable length records (VMS)
  816.  
  817. 4.2.4  Created
  818.  
  819.    Indicates the creation date of the file.  Dates are in the format
  820.    defined in section 4.3.
  821.  
  822. 4.2.5  Modified
  823.  
  824.    Indicates the date and time the file was last modified or closed
  825.    after being open for write.
  826.  
  827. 4.2.6  Accessed
  828.  
  829.    Indicates the date and time the file was last accessed on the
  830.    original file system.
  831.  
  832. 4.2.7  Owner
  833.  
  834.    The owner directive gives the name or numerical ID of the owner or
  835.    creator of the file.
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Costanzo, Robinson & Ullmann                                   [Page 15]
  843.  
  844. RFC 1505                 Encoding Header Field               August 1993
  845.  
  846.  
  847. 4.2.8  Group
  848.  
  849.    The group directive gives the name(s) or numerical IDs of the group
  850.    or groups to which the file belongs.
  851.  
  852. 4.2.9  ACL
  853.  
  854.    This directive specifies the access control list attribute of an
  855.    object (the ACL attribute may occur more than once within an object).
  856.    The list consist of a series of pairs of IDs and access codes in the
  857.    format:
  858.  
  859.                 user-ID:access-list
  860.  
  861.  
  862.    There are four reserved IDs:
  863.  
  864.                 $OWNER  the owner or creator
  865.                 $GROUP  a member of the group or groups
  866.                 $SYSTEM a system administrator
  867.                 $REST   everyone else
  868.  
  869.    The access list is zero or more single letters:
  870.  
  871.                 A    add (create file)
  872.                 D    delete
  873.                 L    list (read directory)
  874.                 P    change protection
  875.                 R    read
  876.                 U    use
  877.                 W    write
  878.                 X    execute
  879.                 *    all possible access
  880.  
  881. 4.2.10  Password
  882.  
  883.    The password attribute gives the access password for this object.
  884.    Since the content of the object follows (being the raison d'etre of
  885.    the encoding), the appearance of the password in plain text is not
  886.    considered a security problem.  If the password is actually set by
  887.    the decoder on a created object, the security (or lack) is the
  888.    responsibility of the application domain controlling the decoder as
  889.    is true of ACL and other protections.
  890.  
  891. 4.2.11  Block
  892.  
  893.    The block attribute gives the block size of the file as a decimal
  894.    number of bytes.
  895.  
  896.  
  897.  
  898. Costanzo, Robinson & Ullmann                                   [Page 16]
  899.  
  900. RFC 1505                 Encoding Header Field               August 1993
  901.  
  902.  
  903. 4.2.12  Record
  904.  
  905.    The record attribute gives the record size of the file as a decimal
  906.    number of bytes.
  907.  
  908. 4.2.13  Application
  909.  
  910.    This specifies the application that the file was created with or
  911.    belongs to.  This is of particular interest for Macintosh files.
  912.  
  913. 4.3  Date Field
  914.  
  915.    Various attributes have a date and time subsequent to and associated
  916.    with them.
  917.  
  918. 4.3.1  Syntax
  919.  
  920.    The syntax of the date field is a combination of date, time, and
  921.    timezone:
  922.  
  923.        DD Mon YYYY HH:MM:SS.FFFFFF [+-]HHMMSS
  924.  
  925.        Date :=  DD Mon YYYY      1 or 2 Digits " " 3 Alpha " " 4 Digits
  926.        DD   :=  Day              e.g. "08", " 8", "8"
  927.        Mon  :=  Month            "Jan" | "Feb" | "Mar" | "Apr" |
  928.                                  "May" | "Jun" | "Jul" | "Aug" |
  929.                                  "Sep" | "Oct" | "Nov" | "Dec"
  930.        YYYY :=  Year
  931.        Time :=  HH:MM:SS.FFFFFF  2 Digits ":" 2 Digits [ ":" 2 Digits
  932.                                  ["." 1 to 6 Digits ] ]
  933.                                  e.g. 00:00:00, 23:59:59.999999
  934.        HH   :=  Hours            00 to 23
  935.        MM   :=  Minutes          00 to 59
  936.        SS   :=  Seconds          00 to 60 (60 only during a leap second)
  937.        FFFFF:=  Fraction
  938.        Zone :=  [+-]HHMMSS       "+" | "-" 2 Digits [ 2 Digits
  939.                                  [ 2 Digits ] ]
  940.        HH   :=  Local Hour Offset
  941.        MM   :=  Local Minutes Offset
  942.        SS   :=  Local Seconds Offset
  943.  
  944. 4.3.2  Semantics
  945.  
  946.    The date information is that which the file system has stored in
  947.    regard to the file system object.  Date information is stored
  948.    differently and with varying degrees of precision by different
  949.    computer file systems.  An encoder must include as much date
  950.    information as it has available concerning the file system object.  A
  951.  
  952.  
  953.  
  954. Costanzo, Robinson & Ullmann                                   [Page 17]
  955.  
  956. RFC 1505                 Encoding Header Field               August 1993
  957.  
  958.  
  959.    decoder which receives an object encoded with a date field containing
  960.    greater precision than its own must disregard the excessive
  961.    information.  Zone is Co-ordinated Universal Time "UTC" (formerly
  962.    called "Greenwich Mean Time").  The field specifies the time zone of
  963.    the file system object as an offset from Universal Time.  It is
  964.    expressed as a signed [+-] two, four or six digit number.
  965.  
  966.    A file that was created April 15, 1993 at 8:05 p.m.  in Roselle Park,
  967.    New Jersey, U.S.A.  might have a date field which looks like:
  968.  
  969.    15 Apr 1993 20:05:22.12 -0500
  970.  
  971. 5.  LZJU90:  Compressed Encoding
  972.  
  973.    LZJU90 is an encoding for a binary or text object to be sent in an
  974.    Internet mail message.  The encoding provides both compression and
  975.    representation in a text format that will successfully survive
  976.    transmission through the many different mailers and gateways that
  977.    comprise the Internet and connected mail networks.
  978.  
  979. 5.1  Overview
  980.  
  981.    The encoding first compresses the binary object, using a modified
  982.    LZ77 algorithm, called LZJU90.  It then encodes each 6 bits of the
  983.    output of the compression as a text character, using a character set
  984.    chosen to survive any translations between codes, such as ASCII to
  985.    EBCDIC.  The 64 six-bit strings 000000 through 111111 are represented
  986.    by the characters "+", "-", "0" to "9", "A" to "Z", and "a" to "z".
  987.    The output text begins with a line identifying the encoding.  This is
  988.    for visual reference only, the "Encoding:" field in the header
  989.    identifies the section to the user program.  It also names the object
  990.    that was encoded, usually by a file name.
  991.  
  992.    The format of this line is:
  993.  
  994.                 * LZJU90 <name>
  995.  
  996.  
  997.    where <name> is optional.  For example:
  998.  
  999.                 * LZJU90 vmunix
  1000.  
  1001.    This is followed by the compressed and encoded data, broken into
  1002.    lines where convenient.  It is recommended that lines be broken every
  1003.    78 characters to survive mailers than incorrectly restrict line
  1004.    length.  The decoder must accept lines with 1 to 1000 characters on
  1005.    each line.  After this, there is one final line that gives the number
  1006.    of bytes in the original data and a CRC of the original data.  This
  1007.  
  1008.  
  1009.  
  1010. Costanzo, Robinson & Ullmann                                   [Page 18]
  1011.  
  1012. RFC 1505                 Encoding Header Field               August 1993
  1013.  
  1014.  
  1015.    should match the byte count and CRC found during decompression.
  1016.  
  1017.    This line has the format:
  1018.  
  1019.                 * <count> <CRC>
  1020.  
  1021.  
  1022.    where <count> is a decimal number, and CRC is 8 hexadecimal digits.
  1023.    For example:
  1024.  
  1025.                 * 4128076 5AC2D50E
  1026.  
  1027.    The count used in the Encoding:  field in the message header is the
  1028.    total number of lines, including the start and end lines that begin
  1029.    with *.  A complete example is given in section 5.3.2.
  1030.  
  1031. 5.2  Specification of the LZJU90 compression
  1032.  
  1033.    The Lempel-Ziv-Storer-Szymanski model of mixing pointers and literal
  1034.    characters is used in the compression algorithm.  Repeat occurrences
  1035.    of strings of octets are replaced by pointers to the earlier
  1036.    occurrence.
  1037.  
  1038.    The data compression is defined by the decoding algorithm.  Any
  1039.    encoder that emits symbols which cause the decoder to produce the
  1040.    original input is defined to be valid.
  1041.  
  1042.    There are many possible strategies for the maximal-string matching
  1043.    that the encoder does, section 5.3.1 gives the code for one such
  1044.    algorithm.  Regardless of which algorithm is used, and what tradeoffs
  1045.    are made between compression ratio and execution speed or space, the
  1046.    result can always be decoded by the simple decoder.
  1047.  
  1048.    The compressed data consists of a mixture of unencoded literal
  1049.    characters and copy pointers which point to an earlier occurrence of
  1050.    the string to be encoded.
  1051.  
  1052.    Compressed data contains two types of codewords:
  1053.  
  1054.    LITERAL pass the literal directly to the uncompressed output.
  1055.  
  1056.    COPY    length, offset
  1057.            go back offset characters in the output and copy length
  1058.            characters forward to the current position.
  1059.  
  1060.    To distinguish between codewords, the copy length is used.  A copy
  1061.    length of zero indicates that the following codeword is a literal
  1062.    codeword.  A copy length greater than zero indicates that the
  1063.  
  1064.  
  1065.  
  1066. Costanzo, Robinson & Ullmann                                   [Page 19]
  1067.  
  1068. RFC 1505                 Encoding Header Field               August 1993
  1069.  
  1070.  
  1071.    following codeword is a copy codeword.
  1072.  
  1073.    To improve copy length encoding, a threshold value of 2 has been
  1074.    subtracted from the original copy length for copy codewords, because
  1075.    the minimum copy length is 3 in this compression scheme.
  1076.  
  1077.    The maximum offset value is set at 32255.  Larger offsets offer
  1078.    extremely low improvements in compression (less than 1 percent,
  1079.    typically).
  1080.  
  1081.    No special encoding is done on the LITERAL characters.  However,
  1082.    unary encoding is used for the copy length and copy offset values to
  1083.    improve compression.  A start-step-stop unary code is used.
  1084.  
  1085.    A (start, step, stop) unary code of the integers is defined as
  1086.    follows:  The Nth codeword has N ones followed by a zero followed by
  1087.    a field of size START + (N * STEP).  If the field width is equal to
  1088.    STOP then the preceding zero can be omitted.  The integers are laid
  1089.    out sequentially through these codewords.  For example, (0, 1, 4)
  1090.    would look like:
  1091.  
  1092.              Codeword      Range
  1093.  
  1094.              0             0
  1095.              10x           1-2
  1096.              110xx         3-6
  1097.              1110xxx       7-14
  1098.              1111xxxx      15-30
  1099.  
  1100.    Following are the actual values used for copy length and copy offset:
  1101.  
  1102.    The copy length is encoded with a (0, 1, 7) code leading to a maximum
  1103.    copy length of 256 by including the THRESHOLD value of 2.
  1104.  
  1105.              Codeword       Range
  1106.  
  1107.              0              0
  1108.              10x            3-4
  1109.              110xx          5-8
  1110.              1110xxx        9-16
  1111.              11110xxxx      17-32
  1112.              111110xxxxx    33-64
  1113.              1111110xxxxxx  65-128
  1114.              1111111xxxxxxx 129-256
  1115.  
  1116.    The copy offset is encoded with a (9, 1, 14) code leading to a
  1117.    maximum copy offset of 32255.  Offset 0 is reserved as an end of
  1118.    compressed data flag.
  1119.  
  1120.  
  1121.  
  1122. Costanzo, Robinson & Ullmann                                   [Page 20]
  1123.  
  1124. RFC 1505                 Encoding Header Field               August 1993
  1125.  
  1126.  
  1127.              Codeword       Range
  1128.  
  1129.              0xxxxxxxxx                0-511
  1130.              10xxxxxxxxxx            512-1535
  1131.              110xxxxxxxxxxx         1536-3583
  1132.              1110xxxxxxxxxxxx       3485-7679
  1133.              11110xxxxxxxxxxxxx     7680-15871
  1134.              11111xxxxxxxxxxxxxx   15872-32255
  1135.  
  1136.    The 0 has been chosen to signal the start of the field for ease of
  1137.    encoding.  (The bit generator can simply encode one more bit than is
  1138.    significant in the binary representation of the excess.)
  1139.  
  1140.    The stop values are useful in the encoding to prevent out of range
  1141.    values for the lengths and offsets, as well as shortening some codes
  1142.    by one bit.
  1143.  
  1144.    The worst case compression using this scheme is a 1/8 increase in
  1145.    size of the encoded data.  (One zero bit followed by 8 character
  1146.    bits).  After the character encoding, the worst case ratio is 3/2 to
  1147.    the original data.
  1148.  
  1149.    The minimum copy length of 3 has been chosen because the worst case
  1150.    copy length and offset is 3 bits (3) and 19 bits (32255) for a total
  1151.    of 22 bits to encode a 3 character string (24 bits).
  1152.  
  1153. 5.3  The Decoder
  1154.  
  1155.    As mentioned previously, the compression is defined by the decoder.
  1156.    Any encoder that produced output that is correctly decoded is by
  1157.    definition correct.
  1158.  
  1159.    The following is an implementation of the decoder, written more for
  1160.    clarity and as much portability as possible, rather than for maximum
  1161.    speed.
  1162.  
  1163.    When optimized for a specific environment, it will run significantly
  1164.    faster.
  1165.  
  1166.     /* LZJU 90 Decoding program */
  1167.  
  1168.     /* Written By Robert Jung and Robert Ullmann, 1990 and 1991. */
  1169.  
  1170.     /* This code is NOT COPYRIGHT, not protected. It is in the true
  1171.        Public Domain. */
  1172.  
  1173.     #include <stdio.h>
  1174.     #include <string.h>
  1175.  
  1176.  
  1177.  
  1178. Costanzo, Robinson & Ullmann                                   [Page 21]
  1179.  
  1180. RFC 1505                 Encoding Header Field               August 1993
  1181.  
  1182.  
  1183.     typedef unsigned char uchar;
  1184.     typedef unsigned int  uint;
  1185.  
  1186.     #define N          32255
  1187.     #define THRESHOLD      3
  1188.  
  1189.     #define STRTP          9
  1190.     #define STEPP          1
  1191.     #define STOPP         14
  1192.     #define STRTL          0
  1193.     #define STEPL          1
  1194.     #define STOPL          7
  1195.  
  1196.     static FILE *in;
  1197.     static FILE *out;
  1198.  
  1199.     static int   getbuf;
  1200.     static int   getlen;
  1201.     static long  in_count;
  1202.     static long  out_count;
  1203.     static long  crc;
  1204.     static long  crctable[256];
  1205.     static uchar xxcodes[] =
  1206.     "+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\
  1207.     abcdefghijklmnopqrstuvwxyz";
  1208.     static uchar ddcodes[256];
  1209.  
  1210.     static uchar text[N];
  1211.  
  1212.     #define CRCPOLY         0xEDB88320
  1213.     #define CRC_MASK        0xFFFFFFFF
  1214.     #define UPDATE_CRC(crc, c)  \
  1215.             crc = crctable[((uchar)(crc) ^ (uchar)(c)) & 0xFF] \
  1216.                   ^ (crc >> 8)
  1217.     #define START_RECD      "* LZJU90"
  1218.  
  1219.  
  1220.  
  1221.     void MakeCrctable()     /* Initialize CRC-32 table */
  1222.     {
  1223.     uint i, j;
  1224.     long r;
  1225.         for (i = 0; i <= 255; i++) {
  1226.             r = i;
  1227.             for (j = 8; j > 0; j--) {
  1228.                 if (r & 1)
  1229.                     r = (r >> 1) ^ CRCPOLY;
  1230.                 else
  1231.  
  1232.  
  1233.  
  1234. Costanzo, Robinson & Ullmann                                   [Page 22]
  1235.  
  1236. RFC 1505                 Encoding Header Field               August 1993
  1237.  
  1238.  
  1239.                     r >>= 1;
  1240.                 }
  1241.             crctable[i] = r;
  1242.             }
  1243.     }
  1244.  
  1245.  
  1246.  
  1247.     int GetXX()             /* Get xxcode and translate */
  1248.     {
  1249.     int c;
  1250.         do {
  1251.             if ((c = fgetc(in)) == EOF)
  1252.                 c = 0;
  1253.             } while (c == '\n');
  1254.         in_count++;
  1255.         return ddcodes[c];
  1256.     }
  1257.  
  1258.  
  1259.  
  1260.     int GetBit()            /* Get one bit from input buffer */
  1261.     {
  1262.     int c;
  1263.         while (getlen <= 0) {
  1264.             c = GetXX();
  1265.             getbuf |= c << (10-getlen);
  1266.             getlen += 6;
  1267.             }
  1268.         c = (getbuf & 0x8000) != 0;
  1269.         getbuf <<= 1;
  1270.         getbuf &= 0xFFFF;
  1271.         getlen--;
  1272.         return(c);
  1273.     }
  1274.  
  1275.  
  1276.  
  1277.     int GetBits(int len)        /* Get len bits */
  1278.     {
  1279.     int c;
  1280.         while (getlen <= 10) {
  1281.             c = GetXX();
  1282.             getbuf |= c << (10-getlen);
  1283.             getlen += 6;
  1284.             }
  1285.         if (getlen < len) {
  1286.             c = (uint)getbuf >> (16-len);
  1287.  
  1288.  
  1289.  
  1290. Costanzo, Robinson & Ullmann                                   [Page 23]
  1291.  
  1292. RFC 1505                 Encoding Header Field               August 1993
  1293.  
  1294.  
  1295.             getbuf = GetXX();
  1296.             c |= getbuf >> (6+getlen-len);
  1297.             getbuf <<= (10+len-getlen);
  1298.             getbuf &= 0xFFFF;
  1299.             getlen -= len - 6;
  1300.             }
  1301.         else {
  1302.             c = (uint)getbuf >> (16-len);
  1303.             getbuf <<= len;
  1304.             getbuf &= 0xFFFF;
  1305.             getlen -= len;
  1306.             }
  1307.         return(c);
  1308.     }
  1309.  
  1310.  
  1311.  
  1312.     int DecodePosition()    /* Decode offset position pointer */
  1313.     {
  1314.     int c;
  1315.     int width;
  1316.     int plus;
  1317.     int pwr;
  1318.         plus = 0;
  1319.         pwr = 1 << STRTP;
  1320.         for (width = STRTP; width < STOPP; width += STEPP) {
  1321.             c = GetBit();
  1322.             if (c == 0)
  1323.                 break;
  1324.             plus += pwr;
  1325.             pwr <<= 1;
  1326.             }
  1327.         if (width != 0)
  1328.             c = GetBits(width);
  1329.         c += plus;
  1330.         return(c);
  1331.     }
  1332.  
  1333.  
  1334.  
  1335.     int DecodeLength()      /* Decode code length */
  1336.     {
  1337.     int c;
  1338.     int width;
  1339.     int plus;
  1340.     int pwr;
  1341.         plus = 0;
  1342.         pwr = 1 << STRTL;
  1343.  
  1344.  
  1345.  
  1346. Costanzo, Robinson & Ullmann                                   [Page 24]
  1347.  
  1348. RFC 1505                 Encoding Header Field               August 1993
  1349.  
  1350.  
  1351.         for (width = STRTL; width < STOPL; width += STEPL) {
  1352.             c = GetBit();
  1353.             if (c == 0)
  1354.                 break;
  1355.             plus += pwr;
  1356.             pwr <<= 1;
  1357.             }
  1358.         if (width != 0)
  1359.             c = GetBits(width);
  1360.         c += plus;
  1361.     return(c);
  1362.     }
  1363.  
  1364.  
  1365.     void InitCodes()        /* Initialize decode table */
  1366.     {
  1367.     int i;
  1368.         for (i = 0; i < 256; i++) ddcodes[i] = 0;
  1369.         for (i = 0; i < 64; i++) ddcodes[xxcodes[i]] = i;
  1370.     return;
  1371.     }
  1372.  
  1373.     main(int ac, char **av)            /* main program */
  1374.     {
  1375.     int r;
  1376.     int j, k;
  1377.     int c;
  1378.     int pos;
  1379.     char buf[80];
  1380.     char name[3];
  1381.     long num, bytes;
  1382.  
  1383.         if (ac < 3) {
  1384.             fprintf(stderr, "usage: judecode in out\n");
  1385.             return(1);
  1386.             }
  1387.  
  1388.         in = fopen(av[1], "r");
  1389.         if (!in){
  1390.             fprintf(stderr, "Can't open %s\n", av[1]);
  1391.             return(1);
  1392.             }
  1393.  
  1394.  
  1395.         out = fopen(av[2], "wb");
  1396.         if (!out) {
  1397.             fprintf(stderr, "Can't open %s\n", av[2]);
  1398.             fclose(in);
  1399.  
  1400.  
  1401.  
  1402. Costanzo, Robinson & Ullmann                                   [Page 25]
  1403.  
  1404. RFC 1505                 Encoding Header Field               August 1993
  1405.  
  1406.  
  1407.         return(1);
  1408.             }
  1409.  
  1410.         while (1) {
  1411.             if (fgets(buf, sizeof(buf), in) == NULL) {
  1412.                 fprintf(stderr, "Unexpected EOF\n");
  1413.             return(1);
  1414.                 }
  1415.             if (strncmp(buf, START_RECD, strlen(START_RECD)) == 0)
  1416.                 break;
  1417.             }
  1418.  
  1419.         in_count = 0;
  1420.         out_count = 0;
  1421.         getbuf = 0;
  1422.         getlen = 0;
  1423.  
  1424.         InitCodes();
  1425.         MakeCrctable();
  1426.  
  1427.         crc = CRC_MASK;
  1428.         r = 0;
  1429.  
  1430.         while (feof(in) == 0) {
  1431.             c = DecodeLength();
  1432.             if (c == 0) {
  1433.                 c = GetBits(8);
  1434.                 UPDATE_CRC(crc, c);
  1435.                 out_count++;
  1436.                 text[r] = c;
  1437.                 fputc(c, out);
  1438.                 if (++r >= N)
  1439.                     r = 0;
  1440.                 }
  1441.  
  1442.             else {
  1443.                 pos = DecodePosition();
  1444.                 if (pos == 0)
  1445.                     break;
  1446.                 pos--;
  1447.                 j = c + THRESHOLD - 1;
  1448.                 pos = r - pos - 1;
  1449.                 if (pos < 0)
  1450.                     pos += N;
  1451.                 for (k = 0; k < j; k++) {
  1452.                     c = text[pos];
  1453.                     text[r] = c;
  1454.                     UPDATE_CRC(crc, c);
  1455.  
  1456.  
  1457.  
  1458. Costanzo, Robinson & Ullmann                                   [Page 26]
  1459.  
  1460. RFC 1505                 Encoding Header Field               August 1993
  1461.  
  1462.  
  1463.                     out_count++;
  1464.                     fputc(c, out);
  1465.                     if (++r >= N)
  1466.                         r = 0;
  1467.                     if (++pos >= N)
  1468.                         pos = 0;
  1469.                     }
  1470.                 }
  1471.             }
  1472.  
  1473.         fgetc(in); /* skip newline */
  1474.  
  1475.         if (fscanf(in, "* %ld %lX", &bytes, &num) != 2) {
  1476.             fprintf(stderr, "CRC record not found\n");
  1477.             return(1);
  1478.             }
  1479.  
  1480.         else if (crc != num) {
  1481.             fprintf(stderr,
  1482.                  "CRC error, expected %lX, found %lX\n",
  1483.                  crc, num);
  1484.             return(1);
  1485.             }
  1486.  
  1487.         else if (bytes != out_count) {
  1488.             fprintf(stderr,
  1489.                  "File size error, expected %lu, found %lu\n",
  1490.                  bytes, out_count);
  1491.         return(1);
  1492.             }
  1493.  
  1494.         else
  1495.             fprintf(stderr,
  1496.                  "File decoded to %lu bytes correctly\n",
  1497.                  out_count);
  1498.  
  1499.         fclose(in);
  1500.         fclose(out);
  1501.     return(0);
  1502.     }
  1503.  
  1504.  
  1505. 5.3.1  An example of an Encoder
  1506.  
  1507.    Many algorithms are possible for the encoder, with different
  1508.    tradeoffs between speed, size, and complexity.  The following is a
  1509.    simple example program which is fairly efficient; more sophisticated
  1510.    implementations will run much faster, and in some cases produce
  1511.  
  1512.  
  1513.  
  1514. Costanzo, Robinson & Ullmann                                   [Page 27]
  1515.  
  1516. RFC 1505                 Encoding Header Field               August 1993
  1517.  
  1518.  
  1519.    somewhat better compression.
  1520.  
  1521.    This example also shows that the encoder need not use the entire
  1522.    window available.  Not using the full window costs a small amount of
  1523.    compression, but can greatly increase the speed of some algorithms.
  1524.  
  1525.     /* LZJU 90 Encoding program */
  1526.  
  1527.     /* Written By Robert Jung and Robert Ullmann, 1990 and 1991. */
  1528.  
  1529.     /* This code is NOT COPYRIGHT, not protected. It is in the true
  1530.        Public Domain. */
  1531.  
  1532.     #include <stdio.h>
  1533.  
  1534.     typedef unsigned char uchar;
  1535.     typedef unsigned int  uint;
  1536.  
  1537.     #define N          24000    /* Size of window buffer */
  1538.     #define F            256   /* Size of look-ahead buffer */
  1539.     #define THRESHOLD      3
  1540.     #define K          16384    /* Size of hash table */
  1541.  
  1542.     #define STRTP          9
  1543.     #define STEPP          1
  1544.     #define STOPP         14
  1545.  
  1546.     #define STRTL          0
  1547.     #define STEPL          1
  1548.     #define STOPL          7
  1549.  
  1550.     #define CHARSLINE     78
  1551.  
  1552.     static FILE *in;
  1553.     static FILE *out;
  1554.  
  1555.     static int   putlen;
  1556.     static int   putbuf;
  1557.     static int   char_ct;
  1558.     static long  in_count;
  1559.     static long  out_count;
  1560.     static long  crc;
  1561.     static long  crctable[256];
  1562.     static uchar xxcodes[] =
  1563.     "+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\
  1564.     abcdefghijklmnopqrstuvwxyz";
  1565.     uchar window_text[N + F + 1];
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Costanzo, Robinson & Ullmann                                   [Page 28]
  1571.  
  1572. RFC 1505                 Encoding Header Field               August 1993
  1573.  
  1574.  
  1575.     /* text contains window, plus 1st F of window again
  1576.        (for comparisons) */
  1577.  
  1578.     uint hash_table[K];
  1579.     /* table of pointers into the text */
  1580.  
  1581.     #define CRCPOLY         0xEDB88320
  1582.     #define CRC_MASK        0xFFFFFFFF
  1583.     #define UPDATE_CRC(crc, c)  \
  1584.       crc = crctable[((uchar)(crc) ^ (uchar)(c)) & 0xFF] \
  1585.       ^ (crc >> 8)
  1586.  
  1587.  
  1588.     void MakeCrctable()     /* Initialize CRC-32 table */
  1589.     {
  1590.     uint i, j;
  1591.     long r;
  1592.         for (i = 0; i <= 255; i++) {
  1593.             r = i;
  1594.             for (j = 8; j > 0; j--) {
  1595.                 if (r & 1)
  1596.                     r = (r >> 1) ^ CRCPOLY;
  1597.                 else
  1598.                     r >>= 1;
  1599.             }
  1600.             crctable[i] = r;
  1601.         }
  1602.     }
  1603.  
  1604.  
  1605.  
  1606.     void PutXX(int c)           /* Translate and put xxcode */
  1607.     {
  1608.         c = xxcodes[c & 0x3F];
  1609.         if (++char_ct > CHARSLINE) {
  1610.             char_ct = 1;
  1611.             fputc('\n', out);
  1612.         }
  1613.         fputc(c, out);
  1614.         out_count++;
  1615.     }
  1616.  
  1617.  
  1618.     void PutBits(int c, int len)  /* Put rightmost "len" bits of "c" */
  1619.     {
  1620.         c <<= 16 - len;
  1621.         c &= 0xFFFF;
  1622.         putbuf |= (uint) c >> putlen;
  1623.  
  1624.  
  1625.  
  1626. Costanzo, Robinson & Ullmann                                   [Page 29]
  1627.  
  1628. RFC 1505                 Encoding Header Field               August 1993
  1629.  
  1630.  
  1631.         c <<= 16 - putlen;
  1632.         c &= 0xFFFF;
  1633.         putlen += len;
  1634.         while (putlen >= 6) {
  1635.             PutXX(putbuf >> 10);
  1636.             putlen -= 6;
  1637.             putbuf <<= 6;
  1638.             putbuf &= 0xFFFF;
  1639.             putbuf |= (uint) c >> 10;
  1640.             c = 0;
  1641.             }
  1642.     }
  1643.  
  1644.  
  1645.     void EncodePosition(int ch) /* Encode offset position pointer */
  1646.     {
  1647.     int width;
  1648.     int prefix;
  1649.     int pwr;
  1650.         pwr = 1 << STRTP;
  1651.         for (width = STRTP; ch >= pwr; width += STEPP, pwr <<= 1)
  1652.             ch -= pwr;
  1653.         if ((prefix = width - STRTP) != 0)
  1654.             PutBits(0xffff, prefix);
  1655.         if (width < STOPP)
  1656.             width++;
  1657.         /* else if (width > STOPP)
  1658.         abort(); do nothing */
  1659.         PutBits(ch, width);
  1660.     }
  1661.  
  1662.  
  1663.     void EncodeLength(int ch)   /* Encode code length */
  1664.     {
  1665.     int width;
  1666.     int prefix;
  1667.     int pwr;
  1668.         pwr = 1 << STRTL;
  1669.         for (width = STRTL; ch >= pwr; width += STEPL, pwr <<= 1)
  1670.             ch -= pwr;
  1671.         if ((prefix = width - STRTL) != 0)
  1672.             PutBits(0xffff, prefix);
  1673.         if (width < STOPL)
  1674.             width++;
  1675.         /* else if (width > STOPL)
  1676.         abort(); do nothing */
  1677.         PutBits(ch, width);
  1678.     }
  1679.  
  1680.  
  1681.  
  1682. Costanzo, Robinson & Ullmann                                   [Page 30]
  1683.  
  1684. RFC 1505                 Encoding Header Field               August 1993
  1685.  
  1686.  
  1687.     main(int ac, char **av)            /* main program */
  1688.     {
  1689.     uint r, s, i, c;
  1690.     uchar *p, *rp;
  1691.     int match_position;
  1692.     int match_length;
  1693.     int len;
  1694.     uint hash, h;
  1695.  
  1696.         if (ac < 3) {
  1697.             fprintf(stderr, "usage: juencode in out\n");
  1698.         return(1);
  1699.             }
  1700.  
  1701.         in = fopen(av[1], "rb");
  1702.         if (!in) {
  1703.             fprintf(stderr, "Can't open %s\n", av[1]);
  1704.         return(1);
  1705.             }
  1706.  
  1707.         out = fopen(av[2], "w");
  1708.         if (!out) {
  1709.             fprintf(stderr, "Can't open %s\n", av[2]);
  1710.             fclose(in);
  1711.         return(1);
  1712.             }
  1713.  
  1714.         char_ct = 0;
  1715.         in_count = 0;
  1716.         out_count = 0;
  1717.         putbuf = 0;
  1718.         putlen = 0;
  1719.         hash = 0;
  1720.  
  1721.         MakeCrctable();
  1722.         crc = CRC_MASK;
  1723.  
  1724.         fprintf(out, "* LZJU90 %s\n", av[1]);
  1725.  
  1726.         /* The hash table inititialization is somewhat arbitrary */
  1727.         for (i = 0; i < K; i++) hash_table[i] = i % N;
  1728.  
  1729.         r = 0;
  1730.         s = 0;
  1731.  
  1732.         /* Fill lookahead buffer */
  1733.  
  1734.         for (len = 0; len < F && (c = fgetc(in)) != EOF; len++) {
  1735.  
  1736.  
  1737.  
  1738. Costanzo, Robinson & Ullmann                                   [Page 31]
  1739.  
  1740. RFC 1505                 Encoding Header Field               August 1993
  1741.  
  1742.  
  1743.             UPDATE_CRC(crc, c);
  1744.         in_count++;
  1745.         window_text[s++] = c;
  1746.         }
  1747.  
  1748.  
  1749.         while (len > 0) {
  1750.         /* look for match in window at hash position */
  1751.         h = ((((window_text[r] << 5) ^ window_text[r+1])
  1752.                 << 5) ^ window_text[r+2]);
  1753.         p = window_text + hash_table[h % K];
  1754.         rp = window_text + r;
  1755.         for (i = 0, match_length = 0; i < F; i++) {
  1756.                 if (*p++ != *rp++) break;
  1757.                 match_length++;
  1758.                 }
  1759.         match_position = r - hash_table[h % K];
  1760.         if (match_position <= 0) match_position += N;
  1761.  
  1762.         if (match_position > N - F - 2) match_length = 0;
  1763.         if (match_position > in_count - len - 2)
  1764.             match_length = 0; /* ! :-) */
  1765.  
  1766.         if (match_length > len)
  1767.             match_length = len;
  1768.         if (match_length < THRESHOLD) {
  1769.             EncodeLength(0);
  1770.             PutBits(window_text[r], 8);
  1771.             match_length = 1;
  1772.             }
  1773.         else {
  1774.             EncodeLength(match_length - THRESHOLD + 1);
  1775.             EncodePosition(match_position);
  1776.             }
  1777.  
  1778.         for (i = 0; i < match_length &&
  1779.                         (c = fgetc(in)) != EOF; i++) {
  1780.                 UPDATE_CRC(crc, c);
  1781.                 in_count++;
  1782.             window_text[s] = c;
  1783.                 if (s < F - 1)
  1784.                 window_text
  1785.                 [s + N] = c;
  1786.             if (++s > N - 1) s = 0;
  1787.             hash = ((hash << 5) ^ window_text[r]);
  1788.             if (r > 1) hash_table[hash % K] = r - 2;
  1789.             if (++r > N - 1) r = 0;
  1790.             }
  1791.  
  1792.  
  1793.  
  1794. Costanzo, Robinson & Ullmann                                   [Page 32]
  1795.  
  1796. RFC 1505                 Encoding Header Field               August 1993
  1797.  
  1798.  
  1799.         while (i++ < match_length) {
  1800.             if (++s > N - 1) s = 0;
  1801.             hash = ((hash << 5) ^ window_text[r]);
  1802.             if (r > 1) hash_table[hash % K] = r - 2;
  1803.             if (++r > N - 1 ) r = 0;
  1804.             len--;
  1805.                 }
  1806.         }
  1807.  
  1808.  
  1809.         /* end compression indicator */
  1810.         EncodeLength(1);
  1811.         EncodePosition(0);
  1812.         PutBits(0, 7);
  1813.  
  1814.         fprintf(out, "\n* %lu %08lX\n", in_count, crc);
  1815.         fprintf(stderr, "Encoded %lu bytes to %lu symbols\n",
  1816.                 in_count, out_count);
  1817.  
  1818.         fclose(in);
  1819.         fclose(out);
  1820.  
  1821.     return(0);
  1822.     }
  1823.  
  1824.  
  1825. 5.3.2  Example LZJU90 Compressed Object
  1826.  
  1827.    The following is an example of an LZJU90 compressed object.  Using
  1828.    this as source for the program in section 5.3 will reveal what it is.
  1829.  
  1830.       Encoding: 7 LZJU90 Text
  1831.  
  1832.       * LZJU90 example
  1833.       8-mBtWA7WBVZ3dEBtnCNdU2WkE4owW+l4kkaApW+o4Ir0k33Ao4IE4kk
  1834.       bYtk1XY618NnCQl+OHQ61d+J8FZBVVCVdClZ2-LUI0v+I4EraItasHbG
  1835.       VVg7c8tdk2lCBtr3U86FZANVCdnAcUCNcAcbCMUCdicx0+u4wEETHcRM
  1836.       7tZ2-6Btr268-Eh3cUAlmBth2-IUo3As42laIE2Ao4Yq4G-cHHT-wCEU
  1837.       6tjBtnAci-I++
  1838.       * 190 081E2601
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850. Costanzo, Robinson & Ullmann                                   [Page 33]
  1851.  
  1852. RFC 1505                 Encoding Header Field               August 1993
  1853.  
  1854.  
  1855. 6.  Alphabetical Listing of Defined Encodings
  1856.  
  1857.  
  1858.         Keyword         Description             Section  Reference(s)
  1859.         _______         ___________             _______  ____________
  1860.  
  1861.         EDIFACT         EDIFACT format          3.5
  1862.         EDI-X12         EDI X12 format          3.5      ANSI X12
  1863.         EVFU            FORTRAN format          3.4
  1864.         FS              File System format      3.6, 4
  1865.         Hex             Hex binary format       3.3
  1866.         LZJU90          LZJU90 format           3.7, 5
  1867.         LZW             LZW format              3.8
  1868.         Message         Encapsulated Message    3.2      STD 11, RFC 822
  1869.         PEM, PEM-Clear  Privacy Enhanced Mail   3.10     RFC 1421-1424
  1870.         PGP             Pretty Good Privacy     3.11
  1871.         Postscript      Postscript format       3.14     [8]
  1872.         Shar            Shell Archive format    3.15
  1873.         Signature       Signature               3.12
  1874.         Tar             Tar format              3.13
  1875.         Text            Text                    3.1      IS 10646
  1876.         uuencode        uuencode format         3.9
  1877.         URL             external URL-reference  3.16
  1878.  
  1879. 7.  Security Considerations
  1880.  
  1881.    Security of content and the receiving (decoding) system is discussed
  1882.    in sections 3.10, 3.11, 3.15, and 4.2.10.  The considerations
  1883.    mentioned also apply to other encodings and attributes with similar
  1884.    functions.
  1885.  
  1886. 8.  References
  1887.  
  1888.    [1] Robinson, D. and R. Ullmann, "Encoding Header Field for Internet
  1889.        Messages", RFC 1154, Prime Computer, Inc., April 1990.
  1890.  
  1891.    [2] Crocker, D., "Standard for the Format of ARPA Internet Text
  1892.        Messages", STD 11, RFC 822, University of Delaware, August 1982.
  1893.  
  1894.    [3] International Organization for Standardization, Information
  1895.        Technology -- Universal Coded Character Set (UCS).  ISO/IEC
  1896.        10646-1:1993, June 1993.
  1897.  
  1898.    [4] Linn, J., "Privacy Enhancement for Internet Electronic Mail: Part
  1899.        I: Message Encryption and Authentication Procedures" RFC 1421,
  1900.        IAB IRTF PSRG, IETF PEM WG, February 1993.
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Costanzo, Robinson & Ullmann                                   [Page 34]
  1907.  
  1908. RFC 1505                 Encoding Header Field               August 1993
  1909.  
  1910.  
  1911.    [5] Kent, S., "Privacy Enhancement for Internet Electronic Mail: Part
  1912.        II: Certificate-Based Key Management", RFC 1422, IAB IRTF PSRG,
  1913.        IETF PEM, BBN, February 1993.
  1914.  
  1915.    [6] Balenson, D., "Privacy Enhancement for Internet Electronic Mail:
  1916.        Part III: Algorithms, Modes, and Identifiers", RFC 1423, IAB IRTF
  1917.        PSRG, IETF PEM WG, TIS, February 1993.
  1918.  
  1919.    [7] Kaliski, B., "Privacy Enhancement for Internet Electronic Mail:
  1920.        Part IV: Key Certification and Related Services", RFC 1424, RSR
  1921.        Laboratories, February 1993.
  1922.  
  1923.    [8] Adobe Systems Inc., PostScript Language Reference Manual.  2nd
  1924.        Edition, 2nd Printing, January 1991.
  1925.  
  1926.    [9] Rose, M. and E. Steffererud, "Proposed Standard for Message
  1927.        Encapsulation", RFC 934, Delaware and NMA, January 1985.
  1928.  
  1929.   [10] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
  1930.        USC/Information Sciences Institute, August 1982.
  1931.  
  1932.   [11] Borenstein, N., and N. Freed, "MIME (Multipurpose Internet Mail
  1933.        Extensions): Mechanisms for Specifying and Describing the Format
  1934.        of Internet Message Bodies", RFC 1341, Bellcore, Innosoft, June
  1935.        1992.
  1936.  
  1937.   [12] Borenstein, N., and M. Linimon, "Extension of MIME Content-Types
  1938.        to a New Medium", RFC 1437, 1 April 1993.
  1939.  
  1940. 9.  Acknowledgements
  1941.  
  1942.    The authors would like to thank Robert Jung for his contributions to
  1943.    this work, in particular the public domain sample code for LZJU90.
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Costanzo, Robinson & Ullmann                                   [Page 35]
  1963.  
  1964. RFC 1505                 Encoding Header Field               August 1993
  1965.  
  1966.  
  1967. 10.  Authors' Addresses
  1968.  
  1969.    Albert K. Costanzo
  1970.    AKC Consulting Inc.
  1971.    P.O. Box 4031
  1972.    Roselle Park, NJ  07204-0531
  1973.  
  1974.    Phone: +1 908 298 9000
  1975.    Email: AL@AKC.COM
  1976.  
  1977.  
  1978.    David Robinson
  1979.    Computervision Corporation
  1980.    100 Crosby Drive
  1981.    Bedford, MA  01730
  1982.  
  1983.    Phone: +1 617 275 1800 x2774
  1984.    Email: DRB@Relay.CV.COM
  1985.  
  1986.  
  1987.    Robert Ullmann
  1988.  
  1989.    Phone: +1 617 247 7959
  1990.    Email: ariel@world.std.com
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Costanzo, Robinson & Ullmann                                   [Page 36]
  2019.  
  2020.